package com.ruoyi.store.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.store.mapper.StoDishFlavorMapper;
import com.ruoyi.store.domain.StoDishFlavor;
import com.ruoyi.store.service.IStoDishFlavorService;

/**
 * 菜品口味关系Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-11
 */
@Service
public class StoDishFlavorServiceImpl implements IStoDishFlavorService 
{
    @Autowired
    private StoDishFlavorMapper stoDishFlavorMapper;

    /**
     * 查询菜品口味关系
     * 
     * @param id 菜品口味关系主键
     * @return 菜品口味关系
     */
    @Override
    public StoDishFlavor selectStoDishFlavorById(Long id)
    {
        return stoDishFlavorMapper.selectStoDishFlavorById(id);
    }

    /**
     * 查询菜品口味关系列表
     * 
     * @param stoDishFlavor 菜品口味关系
     * @return 菜品口味关系
     */
    @Override
    public List<StoDishFlavor> selectStoDishFlavorList(StoDishFlavor stoDishFlavor)
    {
        return stoDishFlavorMapper.selectStoDishFlavorList(stoDishFlavor);
    }

    /**
     * 新增菜品口味关系
     * 
     * @param stoDishFlavor 菜品口味关系
     * @return 结果
     */
    @Override
    public int insertStoDishFlavor(StoDishFlavor stoDishFlavor)
    {
        return stoDishFlavorMapper.insertStoDishFlavor(stoDishFlavor);
    }

    /**
     * 修改菜品口味关系
     * 
     * @param stoDishFlavor 菜品口味关系
     * @return 结果
     */
    @Override
    public int updateStoDishFlavor(StoDishFlavor stoDishFlavor)
    {
        return stoDishFlavorMapper.updateStoDishFlavor(stoDishFlavor);
    }

    /**
     * 批量删除菜品口味关系
     * 
     * @param ids 需要删除的菜品口味关系主键
     * @return 结果
     */
    @Override
    public int deleteStoDishFlavorByIds(Long[] ids)
    {
        return stoDishFlavorMapper.deleteStoDishFlavorByIds(ids);
    }

    /**
     * 删除菜品口味关系信息
     * 
     * @param id 菜品口味关系主键
     * @return 结果
     */
    @Override
    public int deleteStoDishFlavorById(Long id)
    {
        return stoDishFlavorMapper.deleteStoDishFlavorById(id);
    }
}
